<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<%@ include file="/commons/validation.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>${key.bankNumberChage}</title>
<script language="JavaScript" type="text/javascript"
	src="${ctx}/scripts/div/common.js"></script>
<script type="text/javascript">

   function submitForm(){

     var isTrue=$("editBankForm").fireEvent("onSubmit");
      if(isTrue){

        document.getElementById("editBankForm").submit();
      }
   }

   function Div(exp1, exp2)
   {
　　var n1 = Math.round(exp1); //四舍五入
　　var n2 = Math.round(exp2); //四舍五入

　　var rslt = n1 / n2;

　　if (rslt >= 0)
　　{
　　　　rslt = Math.floor(rslt); //返回值为小于等于其数值参数的最大整数值。
　　}
　　else
　　{
　　　　rslt = Math.ceil(rslt); //返回值为大于等于其数字参数的最小整数。
　　}

　　return rslt;
   }

   var iframe=findFrame('cashieringList');

</script>
</head>

<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2" class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle"> <span class="window_head_intext">${key.bankNumberChage}</span></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_2"></td>
  </tr>
  <tr>
    <td colspan="2" class="content"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="aux_outtable_color"><table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">
          <tr>
            <td colspan="4" class="aux_titletable"><table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td class="align_left"><span class="fontredblod2">
                  <script type="text/javascript">
                  document.write(iframe.getHouseTitle());
                  document.write(iframe.getHouseNumber());
                  </script></span></td>
                  <td class="align_left"><span class="fontredblod2">${key.customerName}
                  <script type="text/javascript">
                  document.write(iframe.getOwnerName());
                  </script></span></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td colspan="4" class="aux_titletable"><span class="window_title_font">${key.oldBankMessage}</span></td>
          </tr>
          <tr>
            <td class="aux_intable_td1">${key.oldBankName}</td>
            <td colspan="3" class="aux_intable_td2">${view.bankName}</td>
          </tr>
          <tr>
            <td class="aux_intable_td1">${key.oldAccNumber}</td>
            <td colspan="3" class="aux_intable_td2">${view.accNumber}</td>
            </tr>
          <tr>
            <td class="aux_intable_td1">${key.oldAccOwner}</td>
            <td colspan="3" class="aux_intable_td2">${view.accOwner}</td>
          </tr>
          <tr>
            <td class="aux_intable_td1">${key.oldContactNumber}</td>
            <td colspan="3" class="aux_intable_td2">
            <script type="text/javascript">


            if('${view.contactNumber}'.length>40){
	            var forlength=Div('${view.contactNumber}'.length,40);
	            for(var tempVar=0;tempVar<forlength;tempVar++){
		            if(tempVar==0){
		            document.writeln('${view.contactNumber}'.substring(0,40));
		            }else{
		            document.writeln('${view.contactNumber}'.substring(tempVar*40,tempVar*40+40));
		            }
	            }
	            document.writeln('${view.contactNumber}'.substring('${view.contactNumber}'.length-'${view.contactNumber}'.length%40,'${view.contactNumber}'.length));

            }else{
            document.write('${view.contactNumber}');
            }
            </script>
            </td>
            </tr>
          <tr>
            <td colspan="4" class="aux_titletable"><span class="window_title_font">${key.newBankMessage}</span></td>
          </tr>
          <form id="editBankForm" name="editBankForm" method="post" action="${ctx}/charge_cashieringAction.do?method=editBankAccount" class="required-validate">
          <input type="hidden" name="keyword" value="${view.keyword}">
          <input type="hidden" name="proRightId" value="${proRightId }">
           <input type="hidden" name="houseId" value="${keyword}">
           <input type="hidden" name="oldAccNumber" value="${view.accNumber}">
           <input type="hidden" name="isActive" value="${view.isActive}">
           <input type="hidden" name="sysdate" value="${view.sysdate}">
           <input type="hidden" name="stopDate" value="${view.stopDate}">
          <tr>
            <td class="aux_intable_td1">${key.newBankName}</td>
            <td colspan="3" class="aux_intable_require">
            <pms:unitedSelect name="bankId"
 					  id="bankId"
   					  dataList="${bankList}"
   					  optionLabel="bankName"
   					  optionValue="keyword"
   					  className="select-one-required">
			</pms:unitedSelect>
            </td>
            </tr>
          <tr>
            <td class="aux_intable_td1">${key.newAccNumber}</td>
            <td colspan="3" class="aux_intable_require"><table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><input name="accNumber" type="text" maxLength="20" class="required validate-char" size="16"></td>
                  </tr>
            </table></td>
            </tr>
          <tr>
            <td class="aux_intable_td1">${key.newAccOwner}</td>
            <td colspan="3" class="aux_intable_require"><input name="accOwner" maxLength="32" type="text" class="required validate-char" size="16"></td>
          </tr>
          <tr>
            <td class="aux_intable_td1">${key.newContactNumber}</td>
            <td colspan="3" class="aux_intable_td2"><input name="contactNumber" maxLength="100" type="text" class="inputtext validate-char" size="16"></td>
          </tr>
        </form>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>

    <td class="window_footer"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
			<td class="buttonOffLeft" id="btn1_21"></td>
   <td class="buttonOffMiddle" id="btn1_22" onClick="submitForm();" onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)" onBlur="btn_change(2)"><img src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom">${key.save}</td>
              <td class="buttonOffRight" id="btn1_23"></td>
            </tr>
        </table></td>
        <td class="btn_between_space"></td>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onClick="windowClose();" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)" onBlur="btn_change(3)"><img src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14" border="0" align="absbottom">${key.close}</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>